package com.hzlj.position.config.rest.wd.impl.traxBean;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@NoArgsConstructor
public class TraxBeanLocateResultDTO {
    @JsonProperty("Imei")
    private String imei;
    @JsonProperty("Imsi")
    private String imsi;
    @JsonProperty("Model")
    private String model;
    @JsonProperty("ActivateDate")
    private String activateDate;
    @JsonProperty("ExpireDate")
    private String expireDate;
    //2024/3/22 9:08:33
    @JsonProperty("GpsTime")
    private String gpsTime;
    //2024/3/22 9:08:33(数据时间)
    @JsonProperty("SignalTime")
    private String signalTime;
    @JsonProperty("Lat")
    private BigDecimal lat;
    @JsonProperty("Lng")
    private BigDecimal lng;
    @JsonProperty("Status")
    private Integer status;
    @JsonProperty("PosType")
    private String posType;
    @JsonProperty("Speed")
    private BigDecimal speed;
    @JsonProperty("Battery")
    private BigDecimal battery;

    public void setSignalTime(String signalTime) {
        this.signalTime = TraxBeanDateParse.parseDateTime(signalTime);
    }

    public void setGpsTime(String gpsTime) {
        this.gpsTime = TraxBeanDateParse.parseDateTime(gpsTime);
    }

    public void setActivateDate(String activateDate) {
        this.activateDate = TraxBeanDateParse.parseDate(activateDate);
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = TraxBeanDateParse.parseDate(expireDate);
    }

}
